package com.system.cipher;

import java.security.GeneralSecurityException;
import java.security.MessageDigest;

public class SHA1 {
	private static final String DigestAlgorithm = "SHA-1";

	public static byte[] encode(byte[] input) throws GeneralSecurityException {
		MessageDigest messageDigest = MessageDigest
				.getInstance(DigestAlgorithm);
		messageDigest.update(input);
		return messageDigest.digest();
	}
}
